class Attachment < ActiveRecord::Base
  belongs_to :user
  mount_uploader :avatar, AvatarUploader

  scope :user_avatar, ->(user_id) {where('user_id = ? AND tag = ?', user_id, "img")}
end
